<template>
  <van-swipe class="my-swipe" :autoplay="3000" indicator-color="#1baeae" touchable>
    <van-swipe-item v-for="(item, index) in list" :key="index">
      <img class="swiper" :src="item.carouselUrl" alt="" @click="goTo(item.redirectUrl)">
    </van-swipe-item>
  </van-swipe>
</template>

<script>
export default {
  props: {
    list: Array
  },
  methods: {
    goTo(url) {
      url = '/'
      window.open(url)
    }
  }
}
</script>

<style lang='less' scoped>
.my-swipe {
  img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
  }

}
</style>
